<Project>
  <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />

  <PropertyGroup>
    <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
    <BinPlaceRuntime>false</BinPlaceRuntime>
    <BinPlaceNative>true</BinPlaceNative>
    <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
  </PropertyGroup>

  <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />

  <!-- Ordering matters! Overriding GetBinPlaceItems and Build targets after the Sdk import. -->
  <Target Name="GetBinPlaceItems">
    <ItemGroup>
       <ExcludeNativeLibrariesRuntimeFiles Condition="'$(RuntimeFlavor)' != 'Mono'"
                                          Include="$(NativeBinDir)System.Globalization.Native.dll;$(NativeBinDir)System.Globalization.Native.so;$(NativeBinDir)System.Globalization.Native.dylib" />
      <BinPlaceItem Include="$(NativeBinDir)*.dll" Exclude="@(ExcludeNativeLibrariesRuntimeFiles)" />
      <BinPlaceItem Include="$(NativeBinDir)*.pdb" />
      <BinPlaceItem Include="$(NativeBinDir)*.lib" />
      <BinPlaceItem Include="$(NativeBinDir)*.a" />
      <BinPlaceItem Include="$(NativeBinDir)*.bc" />
      <BinPlaceItem Include="$(NativeBinDir)*.so" Exclude="@(ExcludeNativeLibrariesRuntimeFiles)" />
      <BinPlaceItem Include="$(NativeBinDir)*.dbg" />
      <BinPlaceItem Include="$(NativeBinDir)*.dylib" Exclude="@(ExcludeNativeLibrariesRuntimeFiles)" />
      <BinPlaceItem Include="$(NativeBinDir)*.dwarf" />
      <BinPlaceItem Include="$(NativeBinDir)*.dex" />
      <BinPlaceItem Include="$(NativeBinDir)*.jar" />
      <BinPlaceItem Include="$(NativeBinDir)*.dat" />
      <FileWrites Include="@(BinPlaceItem)" />
    </ItemGroup>
  </Target>

  <Target Name="Build" DependsOnTargets="BinPlace" />
  <Target Name="CreateManifestResourceNames" />
</Project>
